import '@/assets/main.css'
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import pinia from '@/stores/index'
import 'virtual:svg-icons-register'
// 引入自定义插件对象，注册整个项目中的全局组件
import globalComponent from '@/components/index.js'
import uploader from 'vue-simple-uploader'
import 'vue-simple-uploader/dist/style.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const app = createApp(App)

app.use(router)
app.use(ElementPlus, {
  locale: zhCn
})
app.use(pinia)
app.use(globalComponent)
app.use(uploader)

app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
